<!DOCTYPE html>
<html>
<head>
	<title></title>
		<!-- 引入layui.js -->
	<meta  name="viewport" content="width=device-width, initial-scale=1, maxinum-scale=1">
	<script type="text/javascript" src="D:\sublime\网易云\resources\layui-v2.5.5\layui\layui.all.js"></script>
	<link rel="stylesheet" type="text/css" href="D:\sublime\网易云\resources\layui-v2.5.5\layui\css\layui.css">
	<script type="text/javascript" src="D:\sublime\网易云\resources\layui-v2.5.5\layui\layui.js"></script>
</head>
<body>
	<table class="layui-hide" id="test"></table>
  <script>
layui.use('table', function(){
  var table = layui.table;
  
  table.render({
    elem: '#test'
    ,url:'/demo/table/user/'
    ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
    ,cols: [[
      {field:'id', width:80, title: 'ID', sort: true}
      ,{field:'username', width:80, title: '用户名'}
      ,{field:'sex', width:80, title: '性别', sort: true}
      ,{field:'city', width:80, title: '城市'}
      ,{field:'sign', title: '签名', width: '30%', minWidth: 100} //minWidth：局部定义当前单元格的最小宽度，layui 2.2.1 新增
      ,{field:'experience', title: '积分', sort: true}
      ,{field:'score', title: '评分', sort: true}
      ,{field:'classify', title: '职业'}
      ,{field:'wealth', width:137, title: '财富', sort: true}
    ]]
  });
});
</script>
</body>
</html>